[XEN] Shadow: fix predicate for when to use up-pointers
authorTim Deegan <Tim.Deegan@xensource.com>
Mon, 5 Mar 2007 11:54:55 +0000 (11:54 +0000)
committerTim Deegan <Tim.Deegan@xensource.com>
Mon, 5 Mar 2007 11:54:55 +0000 (11:54 +0000)
which was broken by the introduction of "pinnable" types
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
xen/arch/x86/mm/shadow/private.h

index 479ed269599ee0f73fe7ba0e6af2cee76056b276..70c7c34010200377c00595f7465d975c52e79d9b 100644 (file)
@@ -539,7 +539,7 @@ static inline int sh_get_ref(struct vcpu *v, mfn_t smfn, paddr_t entry_pa)
 
     /* We remember the first shadow entry that points to each shadow. */
     if ( entry_pa != 0 
-         && sh_type_is_pinnable(v, sp->type) 
+         && !sh_type_is_pinnable(v, sp->type) 
          && sp->up == 0 ) 
         sp->up = entry_pa;
     
@@ -559,7 +559,7 @@ static inline void sh_put_ref(struct vcpu *v, mfn_t smfn, paddr_t entry_pa)
 
     /* If this is the entry in the up-pointer, remove it */
     if ( entry_pa != 0 
-         && sh_type_is_pinnable(v, sp->type) 
+         && !sh_type_is_pinnable(v, sp->type) 
          && sp->up == entry_pa ) 
         sp->up = 0;